<template>
  <div>
    <ul>
      <tree-item v-for="data in treeData" :tree-data="data" :key="data.name"></tree-item>
    </ul>
  </div>
</template>
<script>
import TreeItem from '../views/TreeItem.vue'
export default{
  data() {
    return {
      treeData: [
        {
          name: 'dingxu1',
          children: [
            {
              name: 'dingxu11'
            }, {
              name: 'dingxu12'
            }, {
              name: 'dingxu13'
            }]
        },
        {
          name: 'dingxu2',
          children: [{
            name: 'dingxu21'
          }, {
            name: 'dingxu22'
          }, {
            name: 'dingxu23'
          }]
        }, {
          name: 'dingxu3'
        }]
    }
  },
  components: {
    TreeItem
  }
}
</script>